#include <iostream>
using namespace std;

namespace STRUCT_DAY18
{
    struct Person{
        public:
            int Age ;
            char Name[16];
    };  

    struct Person1{
        int Age =22 ;
        char Name[16] = "Tom";
    }; 
};

namespace CLASS_DAY18
{
    class Student{
        public:
            int Age;
            string Name;
    };

    class Student1{
        public:
            int Age =22;
            string Name ="Tom";
    };
};


int main()
{
    {
        using namespace STRUCT_DAY18;
        struct Person stu = { 18,"Hubery" };  //struct初始化
        cout<< stu.Name <<"  " <<stu.Age<< endl;
        
        struct Person1 s ;  
        cout<< s.Name <<"  " <<s.Age<<endl;
        s.Age = 55;
        cout<< "修改Tom年龄后: " << s.Name <<"  " <<s.Age << endl;;
    }

    {
        using namespace CLASS_DAY18;
        Student stu = {18,"Hubery"};  //class初始化
        cout << stu.Name <<"  "<< stu.Age <<endl;
        
        Student1 s;
        cout << s.Name <<"  "<< s.Age <<endl;
        s.Age = 55;
        cout<< "修改Tom年龄后:" << s.Name <<"  " <<s.Age << endl;
    }
	
	return 0;
}

